<template>
  <div>
    <p :class="{ active: isH }">动态class</p>
    <p class="a" :class="{ active: isH }">我是p</p>
    <p :class="['a', 'b', 'c']">多个类名</p>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isH: true,
    };
  },
};
</script>

<style>
.active {
  color: red;
}
</style>